import type { RouterContext } from "@koa/router";
import { BaseController } from "./common";
import { JWTPayload } from "@/services/vendor/jsonwebtoken";
import { container } from "@/services/register";

export default class OssController extends BaseController {
  async signature(ctx: RouterContext) {
    const user = this.getUser<JWTPayload>(ctx);
    return container.resolve("OssService").getSignature(user.userId);
  }
}
